import { Map } from 'immutable'

const defaultState = Map({
    userLogin:{}
})

const reduer = ( state = defaultState,action) => {
    switch(action.type) {
        case 'login': 
            return state.set('userLogin',action.userinfo)
        case 'out': 
            return state.set('userLogin',{}) 
        default:
            return state
    }
}

export default reduer; 